package main

import "fmt"

// 演示 break+label
func break_label() {
	a := 1
Loop:
	for j:=0; j<3; j++ {
		for a<10 {
			fmt.Println(a)
			if a==5 {
				break Loop
			}
			a++
		}
	}
	fmt.Println("break_label last a=",a)
}
// 演示 break+label
func goto_label() {
	a := 1
	for j:=0; j<3; j++ {
		for a<10 {
			fmt.Println(a)
			if a==5 {
				goto Loop
			}
			a++
		}
	}
Loop:
	fmt.Println("goto_label last a=",a)
}

func main()  {
	break_label()
	goto_label()
}
